package com.sm.honkon.ui.activity

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.sm.honkon.R
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch


class SplashActivity :  AppCompatActivity() {
    override fun onCreate(savedInstanceState:  Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_splash)
    }

    override fun onResume() {
        super.onResume()
            lifecycleScope.launch (Dispatchers.Main){
                delay(2000)
                startActivity(Intent(this@SplashActivity,MainActivity::class.java))
                finish()
            }
    }

    override fun onDestroy() {
        super.onDestroy()
    }

}
